Skip to content

fix(release): recover publication convergence#260

Merged
chhoumann merged 1 commit into
masterfrom
fix/release-publication-recovery
Jul 10, 2026
Merged

fix(release): recover publication convergence#260
chhoumann merged 1 commit into
masterfrom
fix/release-publication-recovery

Conversation

@chhoumann

@chhoumann chhoumann commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • allow a reviewed workflow fix on current protected master to recover an older exact release commit
  • poll release state by ID until GitHub converges
  • reclaim only a single exact bot-authored untagged-* draft after verifying its target, metadata, asset names, sizes, and downloaded SHA-256 digests
  • keep the durable version tag explicit and avoid demoting a verified public release into an untagged draft

Failure reproduced

Release run 29079058001 built and tested commit 79c6421, registered tag 2.17.4, attested both assets, uploaded them, and verified their remote digests. The immediate publish response appeared stale, so the old rollback converted the release into an untagged-* draft.

Validation

  • git diff --check
  • npm run format:check
  • npm run lint
  • npm run typecheck
  • npm run test -- scripts/release-contract.test.ts scripts/release-plan.test.ts (28 tests)
  • Ruby YAML parse of .github/workflows/release.yml

Recovery

After this PR is reviewed and merged, dispatch release.yml from protected master for PR #259. The workflow will reclaim only the exact machine-generated orphan draft from the failed run, reverify and re-upload the exact release assets, publish after state convergence, then verify the public tag, downloaded asset hashes, attestations, and recovery-branch cleanup.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 10, 2026

Copy link
Copy Markdown

Deploying podnotes with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1460563
Status: ✅  Deploy successful!
Preview URL: https://85edc311.podnotes.pages.dev
Branch Preview URL: https://fix-release-publication-reco.podnotes.pages.dev

View logs

@chhoumann
chhoumann force-pushed the fix/release-publication-recovery branch from 0d54f23 to 1460563 Compare July 10, 2026 08:24
@chhoumann
chhoumann marked this pull request as ready for review July 10, 2026 08:26
@chhoumann
chhoumann merged commit 9e91f39 into master Jul 10, 2026
5 checks passed
@chhoumann
chhoumann deleted the fix/release-publication-recovery branch July 10, 2026 08:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 146056329f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +115 to +117
const trustedMasterRecovery =
sourceRef === 'refs/heads/master' &&
process.env.EVENT_SHA === master.data.object.sha;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align master recovery attestations with the checked source

When this new master-recovery path is used (workflow_dispatch --ref master for an older release), the attestation is issued from the master run context, but the publish job still verifies with --source-ref "$SOURCE_REF" and --source-digest "$EXPECTED_SHA" where EXPECTED_SHA is the older release commit. The gh attestation verify flags enforce the source repository digest/ref (per the CLI manual: --source-digest enforces the source repository digest and --source-ref enforces the git ref), so no attestation created by a master run can satisfy source-digest=releaseSha, blocking the advertised recovery before publishing.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant